const Koa = require('koa');
const cors = require('koa2-cors');
const app = new Koa();

const routers_client = require('./routers/client');
const koaBody = require('koa-body');

// 使用ctx.body解析中间件
app.use(koaBody({multipart: true}));

app.keys = ['abcdefghijklmn'];

app
    .use(routers_client.routes())
    .use(routers_client.allowedMethods())
    .use(cors());

let server = require('http').Server(app.callback());

server.listen(82);